

local mt = ac.skill['死亡分裂']
mt.skill_type = "passive"
mt.model1 = [[Abilities\Weapons\ZigguratFrostMissile\ZigguratFrostMissile.mdl]]

function mt:on_add()
    local unit = self.owner
    self:gc(unit:event '单位-死亡'(function()
        local point = unit:get_point()
        local player = unit.owner_player
        local name = ('%s-分裂体'):format(unit.name)
        local model = unit:get_model()
        local level = unit.enemy_level
        ac.wait(100,function()
            for a=1,4 do
                local unit = player:create_enemy('小怪模板',point)
                unit:set_enemy_level(level)
                unit:set_model(model)
                unit.name = name
            end
        end)
    end))
end


